<?php

namespace app\admin\framework\api;

#[\attribute]
class Permission
{
    
    const TOP = [
        ['name' => 'Console', 'title' => '控制台', 'list_order' => 1],
        ['name' => 'System', 'title' => '系统管理', 'list_order' => 2],
        ['name' => 'User', 'title' => '会员管理', 'list_order' => 3],
        ['name' => 'Auth', 'title' => '权限管理', 'list_order' => 4],
        ['name' => 'Portal', 'title' => '门户管理', 'list_order' => 5],
        ['name' => 'Order', 'title' => '订单管理', 'list_order' => 6],
    ];
    
    public array $menu = [];
    
    public function __construct(string $name = '', string $parent = '', int $listOrder = 10000)
    {
        $this->menu = ['title' => $name, 'parent' => $parent, 'list_order' => $listOrder];
    }
}